<html>
<title>
文字修仙
</title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="main.css" media="all">
<link rel="stylesheet" href="css/layui.css" tppabs="css/layui.css"  media="all">
<meta name="viewport"  charset="utf-8" content="width=device-width,initial-scale=1.0,user-scalable=0">
<style>
body{
  background-color:black;
  color:white;  
}
#cen{
 padding-top:150px;
}
#ip	{
width:75%;
height:400px;
}
</style>
<body>
<center>
<div id="cen">
<h2>后台授权管理</h2>
<br/>
<br/>
<diV id = "ip">
<div class="layui-form-item">
    <label class="layui-form-label">授权名称：</label>
    <div class="layui-input-block">
      <input type="text" name="username"  id="name" lay-verify="title" autocomplete="off" placeholder="请输入授权IP" class="layui-input">
    </div>
	<br/>
	<label class="layui-form-label">授权IP地址</label>
    <div class="layui-input-block">
      <input type="text" name="username"  id="ipAddr" lay-verify="title" autocomplete="off" placeholder="请输入授权IP地址" class="layui-input">
    </div>
</div>
<br/>
<br/>
<br/>
<br/>
<span>
<button type="button" class="layui-btn layui-btn-normal" id="addIP" onclick="addIP()">赋值</button>
</span>
</div>
</div>
</center>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="layui.js" charset="utf-8"></script>
<script src="http.js"></script>
 <script>
   var layer = layui.layer;
 function addIP(){
    var name = $("#name").val();
	var ipAddr = $("#ipAddr").val();
	var params = {"name":name,"ipAddr":ipAddr};
	var ipInfo = postForParams("xl/game/add_ip",params);
	if(ipInfo.data){
			layer.alert("授权成功");
	}else{
			layer.alert("授权失败");
	}
 	
 }
 </script>
</html>